﻿CREATE TRIGGER LoanFeasabilityStudyAttachments_Tracking_Delete
ON [dbo].[LoanFeasabilityStudyAttachments] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.LoanFeasabilityStudyAttachments_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.LoanFeasabilityStudyAttachments_Tracking s JOIN DELETED i
    ON s.LoanFeasabilityStudyAttachmentID = i.LoanFeasabilityStudyAttachmentID
END














